package com.wujilee.mqdelaytask.service.mq;

import com.wujilee.mqdelaytask.entity.EntityDelayTask;
import com.wujilee.mqdelaytask.mq.entity.DelayTask;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.UUID;
import java.util.function.Consumer;

/**
 * @author liwuji
 * @date 2024/4/12
 * @desc
 **/
@Service
public class KafkaSender implements MqSender<DelayTask> {
    private final static String TOPIC = "topic";
    @Resource
    private KafkaProducer<String, String> producer;
    
    @Override
    public void send(DelayTask task) {
//        ProducerRecord producerRecord = new ProducerRecord();
//        producer.send(new ProducerRecord<>(topic, partition, UUID.randomUUID().toString(), messsage));
    }
}
